﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Pixysoft.Framework.Logs
{
    public interface ILogReport
    {
        /// <summary>
        /// 编号
        /// </summary>
        string Id { get;}

        /// <summary>
        /// 日志搜索的时间跨度 如果没有指定搜索跨度 则-1
        /// </summary>
        int TimeSpan { get;}

        /// <summary>
        /// 搜索结束时间
        /// </summary>
        DateTime TimeFrom { get;}

        /// <summary>
        /// 搜索开始时间
        /// </summary>
        DateTime TimeTo { get;}

        /// <summary>
        /// 创建日志
        /// </summary>
        DateTime CreateDate { get;}

        /// <summary>
        /// 报告对应的日志
        /// </summary>
        ILogRecord Record { get;}

        /// <summary>
        /// 当前报告模块的docuemnt
        /// </summary>
        ILogDocument Document { get;}

        /// <summary>
        /// 如果是异常，则对应的frame doc
        /// </summary>
        ILogDocument[] FrameDocuments { get;}

        /// <summary>
        /// 报告序列化
        /// </summary>
        /// <returns></returns>
        string RawSerialize();

        /// <summary>
        /// 报告序列化
        /// </summary>
        /// <returns></returns>
        string Serialize();

        /// <summary>
        /// 报告序列化
        /// </summary>
        /// <returns></returns>
        string Serialize(bool indent);
    }
}
